﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using PyroGen;

namespace PyroGenTest
{
    [TestClass]
    public class CodeHandlerTest
    {


        [TestMethod]
        public void CodeHandlerConstructor()
        {
           // CodeHandler codeHandler = new CodeHandler();
           // Assert.IsNotNull(codeHandler);
        }


        [TestMethod]
        public void CodeHandlerAnalyzeIncludes()
        {
           // CodeHandler codeHandler = new CodeHandler();
          //  List<Snippet> includeList = codeHandler.AnalyzeIncludes( List<
        }



        // The dump test function - legacy code
        /*public bool TestSimpleObjects()
        {
            
            string testtext = "sample <. tekst .> with some <= meta code => some ending text";
            PositionFinder pf = new PositionFinder(testtext);
            Dictionary<string, Tuple< CodeType, Terminator> > defaultDic =  SettingsLoader.LoadDefaultTags();
            Debug.Assert(defaultDic.Count == 4, "Default metasymbol dictionary has wrong number of symbols");
            Debug.WriteLine("Default Metasymbol Dictionary Count:" + defaultDic.Count);
            Debug.WriteLine("Dict keys:");
            Debug.Indent();
            foreach ( string s in defaultDic.Keys)
                Debug.Write(s+",");
            Debug.Unindent();


            pf.AddAllPositions(defaultDic);
            Debug.Assert(pf.BorderPositions.Count == 6, "Wrong number of found positions");
            //pf.DebugPrint();
            
            Slicer sl = new Slicer(testtext, defaultDic);

            AbstractCode ac = sl.GetAbstractCode();
            
            CodeCompileUnit cu = ac.GenerateAbstractCodeClass();
            
            ac.GenerateCode(cu);

            ac.RunCode(cu);

            return true;
        }*/
    }
}
